Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JSON body example in "Restore as another virtual machine" REST API documentation #71775

Closed
conradkleinespel opened this issue Mar 8, 2021 · 5 comments

Comments

@conradkleinespel
Copy link

@conradkleinespel conradkleinespel commented Mar 8, 2021

This is about the "Restore as another virtual machine" section only.

The JSON body example is invalid as it contains the request parameters in addition to the JSON body, it is currently:

{
  "parameters": {
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "resourceGroupName": "testVaultRG",
        "vaultName": "testVault",
        "fabricName": "Azure",
        "containerName": "IaasVMContainer;iaasvmcontainerv2;testRG;testVM",
        "protectedItemName": "VM;iaasvmcontainerv2;testRG;testVM",
        "recoveryPointId": "348916168024334",
        "api-version": "2019-05-13",
      "parameters": {
        "properties": {
          "objectType":  "IaasVMRestoreRequest",
          "recoveryPointId": "348916168024334",
          "recoveryType": "AlternateLocation",
          "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/testVM",
          "targetVirtualMachineId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/targetRG/providers/Microsoft.Compute/virtualmachines/targetVM",
          "targetResourceGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/targetRG",
          "storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Storage/storageAccounts/testingAccount",
          "virtualNetworkId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/targetRG/providers/Microsoft.Network/virtualNetworks/testNet",
          "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/targetRG/providers/Microsoft.Network/virtualNetworks/testNet/subnets/default",
          "region": "westus",
          "createNewCloudService": false,
          "originalStorageAccountOption": false,
          "encryptionDetails": {
            "encryptionEnabled": false
          }
        }
      }
    }
}

It should be:

{
  "properties": {
    "objectType": "IaasVMRestoreRequest",
    "recoveryPointId": "348916168024334",
    "recoveryType": "AlternateLocation",
    "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/testVM",
    "targetVirtualMachineId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/targetRG/providers/Microsoft.Compute/virtualmachines/targetVM",
    "targetResourceGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/targetRG",
    "storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Storage/storageAccounts/testingAccount",
    "virtualNetworkId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/targetRG/providers/Microsoft.Network/virtualNetworks/testNet",
    "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/targetRG/providers/Microsoft.Network/virtualNetworks/testNet/subnets/default",
    "region": "westus",
    "createNewCloudService": false,
    "originalStorageAccountOption": false,
    "encryptionDetails": {
      "encryptionEnabled": false
    }
  }
}

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@SadiqhAhmed-MSFT
Copy link
Contributor

@SadiqhAhmed-MSFT SadiqhAhmed-MSFT commented Mar 8, 2021

@conradkleinespel Thanks for bringing this to our attention. We will review this with the content owner and update as appropriate.

@dcurwin Could you please review this with the owner and update the document?

@dcurwin
Copy link
Contributor

@dcurwin dcurwin commented Mar 8, 2021

@pvrk - can you please investigate this?

#reassign:pvrk

@pvrk
Copy link
Contributor

@pvrk pvrk commented Mar 8, 2021

@conradkleinespel : Thanks for noticing. Yes, you are right. Modifying the request body JSON now.

@pvrk
Copy link
Contributor

@pvrk pvrk commented Mar 8, 2021

Modified the request body. The changes should be live soon.

@pvrk
Copy link
Contributor

@pvrk pvrk commented Mar 8, 2021

Closing the issue since the doc is corrected. #please-close

@conradkleinespel conradkleinespel changed the title The "Restore as another virtual machine" has a wrong JSON body example Fix JSON body example in "Restore as another virtual machine" documentation Mar 9, 2021
@conradkleinespel conradkleinespel changed the title Fix JSON body example in "Restore as another virtual machine" documentation Fix JSON body example in "Restore as another virtual machine" REST API documentation Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants